<?php
//---------------------------------------------------------------------------------------------------------------------------
    require_once('../../config.inc.php');
    //---------------------------------------------------------------------------------------------------
    include_once($config['app_dir'] . '/classes/tracks.class.php');
    require_once($config['app_dir'] . '/classes/staff.class.php');
    //------------------------------------------------------------------------------------------------------------------------
    $Staff = new objStaff($config['app_id']);
    if( 3!=$Staff->UserGroupID() ) die('You have not permission to see this page. ');//var_dump($Staff->UserGroupID());
    //----------------------------------------------------------------------------------------------
    $grid='';
    $ParamsEdit = new objFormParams('get', 'data_');
    if( !$ParamsEdit->isEmpty() &&  $params_edit = $ParamsEdit->getAssocArray() )
        if( 'edit' == $params_edit['operation']) {
            //var_dump($params_edit);
            $TrackForecastsShow = new objTrackForecastsAdminShow(false, $params_edit['start'], $params_edit['finish']);
            $TrackForecastsShow->enable_active=$params_edit['active'];
            $grid = $TrackForecastsShow->Render();
        }
    //----------------------------------------------------------------------------------------------
    $Form = new objTemplate();
    $Page = new objTemplate();
    $Page->Assign('content', $Form->Fetch('admins/_form_forecasts.tpl') . ' <hr> ' . $grid);
	$Page->Display('admins/lang/page_lang.tpl');
//---------------------------------------------------------------------------------------------------------------------------
?>
